<?php
class UnionCompetitionInfoAction extends SzAbstractAction {
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
    );

    /**
     * 获取玩家自己的公会赛信息
     * @param $userId
     * @param $guildId
     * @param $reqTime
     * @return SzResponse
     * @throws SzException
     */
    public function execute($userId,$guildId,$reqTime) {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_UNION_COMPETITION)) {
            return $this->buildResponse(false);
        }

        return $this->buildResponse(
            UnionCompetitionService::get()->getCompetitionInfo($userId,$guildId,$reqTime)
        );
    }
}